﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HRM.DAL.DAO;
using HRM.DAL.Gateway;

namespace HRM.BLL
{
    public class CatagoryManager
    {
        CatagoryGateway gateway =new CatagoryGateway();
        public string Save(Catagory catagory)
        {
            if (!gateway.HasThisCatagoryAlreadyExist(catagory))
            {
                return gateway.Save(catagory);
            }
            else
            {
                return "Employe Catagory Already Exist !";
            }
        }
        public List<Catagory> GetAllCatagories()
        {
            return gateway.GetAllCatagories();
        }
 
        public string UpdateCatagory(int Id, string Catagory)
        {
            return gateway.UpdateCatagory(Id, Catagory);
        }
        public string DeleteCatagory(int Id)
        {
            return gateway.Delete(Id);
        }
    }
}